/* 
 *  Copyright (C) 2009-2010 milkyjing <milkyjing@gmail.com>
 *
 *  This Program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2, or (at your option)
 *  any later version.
 *   
 *  This Program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 *  GNU General Public License for more details.
 *   
 *  You should have received a copy of the GNU General Public License
 *  along with GNU Make; see the file COPYING.  If not, write to
 *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
 *  http://www.gnu.org/copyleft/gpl.html
 *
 */

#ifndef TCXLIB_UTILITY_H
#define TCXLIB_UTILITY_H
#pragma once

#include "std.h"


/**
 * TCX_PyString structure that is in fact a Python unicode object.
 */
typedef PyObject *TCX_PyString;


/* Inhibit C++ name-mangling for tcxLib functions but not for system calls. */
#ifdef __cplusplus
extern "C" {
#endif    /* __cplusplus */

/**
 * Check if a text string is a CJK string. 
 * Remark: here CJK means "Chinese or Japanese or Korea" not "Chinese & Japanese & Korea".
 *
 * @param self reserved
 * @param args (text)
 * @return TCX_Py_Error_Code
 */
extern TCX_Py_Error_Code tcxlib_is_c_or_j_or_k(PyObject *self, PyObject *args);

/**
 * Change to vertical text layout.
 * @param self reserved
 * @param args (text)
 * @return TCX_PyString
 */
extern TCX_PyString tcxlib_vertical_layout_ass(PyObject *self, PyObject *args);

/**
 * Show progress.
 * @param self reserved
 * @param args (total, completed, file_id, file_num)
 * @return TCX_Py_Error_Code
 */
extern TCX_Py_Error_Code tcxlib_show_progress(PyObject *self, PyObject *args);

#ifdef __cplusplus
}
#endif    /* __cplusplus */

#endif    /* TCXLIB_UTILITY_H */

